<% include header %>
<ul class="archive">
  <% posts.forEach(function (post,index) { %>
  <div id="search">
    <li class="searchtime"><%= post.time.day %></li>
    <li>&nbsp;标题:<a class="searchtitle" href="/u/<%= post.name %>/<%= post.time.minute %>/<%= post.title %>"><%= post.title %></a></li>
  </div>
  <% })%>
  <div class="nofind">
    <img src="../image/22.gif" alt="" height="40">
    <div>没有找到文章。。。</div>
  </div>
</ul>
<% include footer %>
<script>
  //如果没有搜到,给于用户提示
  $(function () {
    var length = $('#search').length;
    console.log(length);
    if (length == 0) {
      $('.empty').css('display', 'block')
    } else {
      $('.empty').css('display', 'none')
    }
  })
</script>